{% extends 'base_template/adminBase.html' %}
{% block main_content %}
    <!-- Main content -->
    <section class="content">
        <div class="container-fluid">
            <div class="row">
                <div class="col-12">
                    <div class="card">
                        <div class="card-header">
                            <h3 class="card-title">详情</h3>
                            <h4><a href="{% url 'stuExport' %}">导出到csv文件</a></h4>
                            <form action="{% url 'adminSearchStu' %}" method="post">
                                {% csrf_token %}
                                <div class="card-tools">
                                    <div class="input-group input-group-sm" style="width: 150px;">
                                        <input type="search" name="search" class="form-control float-right"
                                               placeholder="模糊搜索姓名" value="{{ name }}">
                                        <div class="input-group-append">
                                            <button type="submit" class="btn btn-default"><i
                                                    class="fas fa-search"></i>
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </form>
                        </div>
                        <!-- /.card-header -->
                        <div class="card-body table-responsive p-0">
                            <table class="table table-hover text-nowrap table-bordered" style="border: #0e6042">
                                <thead class="table-primary">
                                <tr>
                                    <th>序号</th>
                                    <th>ID</th>
                                    <th>姓名</th>
                                    <th>邮箱</th>
                                    <th>地址</th>
                                    <th>性别</th>
                                    <th>照片</th>
                                    <th>入学时间</th>
                                    <th>班级</th>
                                    <th>院系</th>
                                    {#                                    <th>操作</th>#}
                                </tr>
                                </thead>
                                <tbody>
                                {% for student in students %}
                                    <tr class="table-responsive-sm table-light" style="font-size: 20px">
                                        <td>{{ forloop.counter }}</td>
                                        <td>{{ student.admin.user_id }}</td>
                                        <td>{{ student.admin.username }}</td>
                                        <td>{{ student.admin.email }}</td>
                                        <td>{{ student.address }}</td>
                                        <td>{{ student.gender }}</td>
                                        <td><img src="{{ student.pic }}" alt="没有照片" style="width:100px"/></td>
                                        <td>{{ student.admin.in_school_time.date }}</td>
                                        <td>{{ student.inClass.name }}</td>
                                        <td>{{ student.dept }}</td>
                                        {#                                        <td><a href="#"#}
                                        {#                                               class="btn btn-danger">删除#}
                                        {#                                        </a>#}
                                        {#                                        </td>#}
                                    </tr>
                                {% endfor %}
                                </tbody>
                            </table>
                        </div>
                        <!-- /.card-body -->
                    </div>
                    <!-- /.card -->
                </div>
            </div>
        </div>
    </section>
    <!-- /.content -->
{% endblock main_content %}